package com.phospherus.flow.entity

import com.fasterxml.jackson.annotation.JsonIgnore
import com.phospherus.common.AttachedFile
import org.hibernate.annotations.Formula
import java.util.*
import javax.persistence.*

/**
 * @author songjinlong
 * @version 1.0
 * @since 2018/1/3
 */
//--------------------- ----------------------
data class DocumentprocessFd(
        var documentProcess_fd_notice: DocumentProcessFdNotice? = null,
        var documentProcess_fd_confirm: DocumentProcessFdConfirm? = null
)

//出厂确认
@Entity
data class DocumentProcessFdConfirm(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null
)

//发货通知单
@Entity
data class DocumentProcessFdNotice(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var orderCode: String? = null,
        var buyerName: String? = null,
        var documentprocess_fdn_bindFContracts: String? = null,
        var documentprocess_fdn_bindDContracts: String? = null,
        var documentprocess_fdn_contracts: String? = null,
        var documentprocess_fdn_time: String? = null,
        var documentprocess_fdn_tradeTerm: String? = null,
        var documentprocess_fdn_hscode: String? = null,
        var documentprocess_fdn_other: String? = null,
        var documentprocess_fdn_fc_factoryName: String? = null, //333
        var documentprocess_fdn_lcc_logisticName: String? = null,
        var documentprocess_fdn_currencyValue: String? = null,

        //新增字段 2018-6-26
        var documentprocess_deliDetail_total_number: String? = null, //数量总和
        var documentprocess_deliDetail_total_amount: String? = null, //金额总


        @Transient
        var documentprocess_fdn_lcc_dfl_contacts: List<DocumentprocessFdnLccDflContact?>? = null,
        @Transient
        var documentprocess_fdn_fc_dff_contacts: List<DocumentProcessFdnFcDffContact?>? = null,
        @Transient
        var documentprocess_deliDetail: List<DocumentprocessDeliDetail?>? = null
)

@Entity
data class DocumentProcessFdnFcDffContact(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var dpfdId: Long? = null,
        var name: String? = null,
        var tel: String? = null,
        var email: String? = null,
        var qq: String? = null,
        var wechat: String? = null,
        //@Formula("(select t.customer_name from customer t where t.id=dpfd_id)")
        var factoryName: String? = null
)

@Entity
data class DocumentprocessDeliDetail(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var dpfdId: Long? = null,
        var dd_products: String? = null,
        var dd_description: String? = null,
        var dd_quantity: String? = null, //0
        var dd_price: String? = null, //0
        var dd_lineAmount: String? = null //0
)

@Entity
data class DocumentprocessFdnLccDflContact(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var dpfdId: Long? = null,
        var name: String? = null,
        var tel: String? = null,
        var email: String? = null,
        var qq: String? = null,
        var wechat: String? = null
)
//---------------------工厂发货----------------------

//---------------------单证员报关----------------------
data class DocumentprocessCc(
        var documentprocess_cc_letterOfDelivery: DocumentprocessCcLetterOfDelivery? =null,
        var documentprocess_cc_customsDeclarationInvoice: DocumentprocessCcCustomsDeclarationInvoice? = null,
        var documentprocess_cc_customsDeclarationBox: DocumentprocessCcCustomsDeclarationBox? = null,
        var documentprocess_cc_customsDeclarationContract: DocumentprocessCcCustomsDeclarationContract? = null,
        var documentprocess_cc_declarationForm: DocumentprocessCcDeclarationForm? = null,
        var documentprocess_cc_declarationElements: DocumentprocessCcDeclarationElements? = null
)

//报关发票
@Entity
data class DocumentprocessCcCustomsDeclarationInvoice(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var documentprocess_cc_cdi_toName: String? = null,
        var documentprocess_cc_cdi_toAdd: String? = null,
        var documentprocess_cc_cdi_toTel: String? = null,
        var documentprocess_cc_cdi_invoiceNO: String? = null,
        var documentprocess_cc_cdi_invoiceDate: String? = null,
        var documentprocess_cc_cdi_fromPort: String? = null,
        var documentprocess_cc_cdi_toPort: String? = null,
        var documentprocess_cc_cdi_shipDate: String? = null,
        var documentprocess_cc_cdi_transport: String? = null,
        var documentprocess_cc_cdi_payTerms: String? = null,
        var documentprocess_cc_cdi_tradeTerms: String? = null,
        var documentprocess_cc_cdi_titleUP: String? = null,
        var documentprocess_cc_cdi_titleAm: String? = null,
        var documentprocess_cc_cdi_currencyValue: String? = null,

        //新增字段 2018-6-26
        var documentprocess_cc_cdi_table_number: String? = null, //数量和
        var documentprocess_cc_cdi_table_amount: String? = null, //金额总和

        @Transient
        var documentprocess_cc_cdi_table: List<DocumentprocessCcCdiTable?>? = null
)

@Entity
data class DocumentprocessCcCdiTable(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var cdiId: Long? = null,
        var documentprocess_cc_cdi_description: String? = null,
        var documentprocess_cc_cdi_quantity: String? = null, //0
        var documentprocess_cc_cdi_price: String? = null, //0
        var documentprocess_cc_cdi_lineAmount: String? = null, //0
        var documentprocess_cc_cdi_products: String? = null
)

//报关单
@Entity
data class DocumentprocessCcDeclarationForm(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var documentprocess_cc_df_enterNO: String? = null,
        var documentprocess_cc_df_hscode: String? = null,
        var documentprocess_cc_df_exportPort: String? = null,
        var documentprocess_cc_df_exportDate: String? = null,
        var documentprocess_cc_df_applyDate: String? = null,
        var documentprocess_cc_df_transport: String? = null,
        var documentprocess_cc_df_transportTool: String? = null,
        var documentprocess_cc_df_delNO: String? = null,
        var documentprocess_cc_df_recordNO: String? = null,
        var documentprocess_cc_df_tradeCountry: String? = null,
        var documentprocess_cc_df_destCountry: String? = null,
        var documentprocess_cc_df_specPort: String? = null,
        var documentprocess_cc_df_yardGoods: String? = null,
        var documentprocess_cc_df_license: String? = null,
        var documentprocess_cc_df_tradeTerms: String? = null,
        var documentprocess_cc_df_freight: String? = null,
        var documentprocess_cc_df_premium: String? = null,
        var documentprocess_cc_df_otherCharge: String? = null,
        var documentprocess_cc_df_contractNO: String? = null,
        var documentprocess_cc_df_numbers: String? = null,
        var documentprocess_cc_df_cartons: String? = null,
        var documentprocess_cc_df_grossWeight: String? = null,
        var documentprocess_cc_df_netWeight: String? = null,
        var documentprocess_cc_df_containerNO: String? = null,
        var documentprocess_cc_df_attachBills: String? = null,
        var documentprocess_cc_df_manufacturer: String? = null,
        var documentprocess_cc_df_marks: String? = null,
        @Transient
        var documentprocess_cc_df_table: List<DocumentprocessCcDfTable?>? = null,
        //2018-07-23新添属性
        var documentprocess_cc_df_company: String? = null,//生产销售单位
        var documentprocess_cc_df_domesticConsignor: String? = null, //境内发货人
        var documentprocess_cc_df_exitCustoms: String? = null, //出境关别
        var documentprocess_cc_df_recordNumber: String? = null, //备案号
        var documentprocess_cc_df_overseasConsignee: String? = null, //境外收货人
        var documentprocess_cc_df_conveyanceAndVoyageNumber: String? = null, //运输工具名称及航次号
        var documentprocess_cc_df_supervisionMode: String? = null, //监管方式
        var documentprocess_cc_df_exemptingNature: String? = null, //征免性质
        var documentprocess_cc_df_departurePort: String? = null, //离境口岸
        var documentprocess_cc_df_shippingMarks: String? = null //标记唛码及备注
)

@Entity
data class DocumentprocessCcDfTable(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var dfId: Long? = null,
        var documentprocess_cc_df_productNO: String? = null,
        var documentprocess_cc_df_productName: String? = null,//商品名称
        var documentprocess_cc_df_productDesc: String? = null, //商品描述
        //var documentprocess_cc_df_prodAndDesc: String? = null,
        var documentprocess_cc_df_quantityAndUnit: String? = null,
        var documentprocess_cc_df_weightAndUnit: String? = null,
        //var documentprocess_cc_df_quaAndWeight: String? = null,
        //var documentprocess_cc_df_destnationContry: String? = null,
        var documentprocess_cc_df_price: String? = null, //0
        var documentprocess_cc_df_amount: String? = null, //0
        var documentprocess_cc_df_currency: String? = null, //人民币
        var documentprocess_cc_df_LevyExemption: String? = null,
        //2018-07-23新添属性
        var documentprocess_cc_df_countryOrigin: String? = null //原产国
)

//报关合同委托书
@Entity
data class DocumentprocessCcCustomsDeclarationContract(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var documentprocess_cc_cdc_contractNO: String? = null,
        var documentprocess_cc_cdc_contractDate: String? = null,
        var documentprocess_cc_cdc_buyer: String? = null,
        var documentprocess_cc_cdc_buyerAdd: String? = null,
        var documentprocess_cc_cdc_buyerTel: String? = null,
        var documentprocess_cc_cdc_description: String? = null,
        var documentprocess_cc_cdc_quantitys: String? = null,
        var documentprocess_cc_cdc_amounts: String? = null,
        var documentprocess_cc_cdc_payTerms: String? = null,
        var documentprocess_cc_cdc_insurance: String? = null,
        var documentprocess_cc_cdc_shipDate: String? = null,
        var documentprocess_cc_cdc_loadPort: String? = null,
        var documentprocess_cc_cdc_marks: String? = null,
        var documentprocess_cc_cdc_destPort: String? = null,
        var documentprocess_cc_cdb_fromPort: String? = null,
        var documentprocess_cc_cdb_toPort: String? = null,
        var documentprocess_cc_cdb_transport: String? = null,
        //var documentprocess_cc_cdb_tradeTerms: String? = null,
        var documentprocess_cc_cdc_quantityUnit: String? = null,
        var documentprocess_cc_cdc_otherTerms: String? = null,
        var documentprocess_cc_cdc_amounts_usd: String? = null,
        var documentprocess_cc_cdb_shipMarks: String? = null
)

//报关箱单
@Entity
data class DocumentprocessCcCustomsDeclarationBox(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var documentprocess_cc_cdb_toName: String? = null,
        var documentprocess_cc_cdb_toAdd: String? = null,
        var documentprocess_cc_cdb_toTel: String? = null,
        var documentprocess_cc_cdb_invoiceNO: String? = null,
        var documentprocess_cc_cdb_invoiceDate: String? = null,
        var documentprocess_cc_cdb_fromPort: String? = null,
        var documentprocess_cc_cdb_toPort: String? = null,
        var documentprocess_cc_cdb_shipDate: String? = null,
        var documentprocess_cc_cdb_transport: String? = null,
        var documentprocess_cc_cdb_payTerms: String? = null,
        var documentprocess_cc_cdb_tradeTerms: String? = null,
        //删掉字段
//        var documentprocess_cc_cdb_totalCartons: String? = null,
//        var documentprocess_cc_cdb_totalNetWeight: String? = null, //0.00
//        var documentprocess_cc_cdb_totalGrossWeight: String? = null, //0.00
        var documentprocess_cc_cdb_totalVolume: String? = null, //0.00
        var documentprocess_cc_cdb_marks: String? = null,
        var documentprocess_cc_cdb_shipMarks: String? = null,

        //新增字段 2018-6-26
        var documentprocess_cc_cdb_total_quantity: String? = null,
        var documentprocess_cc_cdb_total_netWeight: String? = null,
        var documentprocess_cc_cdb_total_grossWeight: String? = null,
        var documentprocess_cc_cdb_total_measurement: String? = null,
        var documentprocess_cc_cdb_totalPackage: String? = null,
        var documentprocess_cc_cdb_totalPackageUnit: String? = null,

        @Transient
        var documentprocess_cc_cdb_table: List<DocumentprocessCcCdbTable?>? = null
)

@Entity
data class DocumentprocessCcCdbTable(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var cdbId: Long? = null,
        var documentprocess_cc_cdb_description: String? = null,
        var documentprocess_cc_cdb_quantity: String? = null, //0
        var documentprocess_cc_cdb_netWeight: String? = null, //0
        var documentprocess_cc_cdb_grossWeight: String? = null, //0
        var documentprocess_cc_cdb_measurement: String? = null,//0
        var documentprocess_cc_cdb_products: String? = null,
        var documentprocess_cc_cdb_packagenumber: String? = null
)

//申报要素
@Entity
data class DocumentprocessCcDeclarationElements(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var documentprocess_cc_de_hscode: String? = null,
        var documentprocess_cc_de_product: String? = null,
        var documentprocess_cc_de_use: String? = null,
        var documentprocess_cc_de_brand: String? = null,
        var documentprocess_cc_de_description: String? = null,
        @Transient
        var documentprocess_cc_de_def: List<DocumentprocessCcDeDef?>? = null
)

@Entity
data class DocumentprocessCcDeDef(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var deId: Long? = null,
        var name: String? = null,
        var value: String? = null
)

//货运委托书
@Entity
data class DocumentprocessCcLetterOfDelivery(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        var documentprocess_cc_lod_from: String? = null,
        var documentprocess_cc_lod_to: String? = null,
        var documentprocess_cc_lod_fax: String? = null,
        var documentprocess_cc_lod_transport: String? = null,
        var documentprocess_cc_lod_contractNO: String? = null,
        var documentprocess_cc_lod_consignee: String? = null,
        var documentprocess_cc_lod_caddress: String? = null,
        var documentprocess_cc_lod_ctel: String? = null,
        var documentprocess_cc_lod_seafreightCH: String? = null, //预付
        var documentprocess_cc_lod_seafreightEN: String? = null, //PREPAID
        var documentprocess_cc_lod_loadPort: String? = null,
        var documentprocess_cc_lod_destPort: String? = null,
        var documentprocess_cc_lod_containers: String? = null,
        var documentprocess_cc_lod_shipDate: String? = null,
        var documentprocess_cc_lod_shipMarks: String? = null,
        var documentprocess_cc_lod_numbers: String? = null,
        var documentprocess_cc_lod_weight: String? = null,
        var documentprocess_cc_lod_size: String? = null,
        var documentprocess_cc_lod_tradeTerms: String? = null,
        var documentprocess_cc_lod_doorToDoor: String? = null,
        var documentprocess_cc_lod_entry: String? = null,
        var documentprocess_cc_lod_signer: String? = null,
        var documentprocess_cc_lod_backAddress: String? = null,
        var documentprocess_cc_lod_rise: String? = null,
        var documentprocess_cc_lod_contact: String? = null,
        var documentprocess_cc_lod_contactTel: String? = null,
        var documentprocess_cc_lod_contactFax: String? = null,
        var documentprocess_cc_lod_date: String? = null,

        var documentprocess_cc_lod_products: String? = null
)
//---------------------单证员报关----------------------

//---------------------向工厂索要发票----------------------
@Entity
data class DocumentprocessAskInvoice(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var documentprocess_aski_currencyValue: String? = null,
        var documentprocess_aski_address: String? = null,
        var documentprocess_aski_addressCode: String? = null,
        var documentprocess_aski_receiver: String? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null,
        @Transient
        var documentprocess_aski_table: List<DocumentprocessAskiTable?>? = listOf()
)

@Entity
data class DocumentprocessAskiTable(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        var askiId: Long? = null,
        var documentprocess_aski_producuts: String? = "",
        var documentprocess_aski_description: String? = "",
        var documentprocess_aski_price: String? = "", //0
        var documentprocess_aski_quantity: String? = "", //0
        var documentprocess_aski_unit: String? = "", //0
        var documentprocess_aski_lineAmount: String? = "" //0
)
//---------------------向工厂索要发票----------------------

//---------------------核销资料（附件）----------------------
@Entity
data class DocumentprocessCollectionData(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP")
        var createTime: Date? = null,
        @Column(insertable = false, updatable = false, columnDefinition = "timestamp NULL ON UPDATE CURRENT_TIMESTAMP")
        var modifyTime: Date? = null,
        @Column(nullable = false)
        var formInstId: Long? = null,
        @Transient
        @JsonIgnore
        var attachedFiles: String? = null,
        @Transient
        var attachedFileList: List<AttachedFile>? = null
)